# -*- coding: utf-8 -*-
# File : create_order.py
# Author: taoyahui
# Date : 2021/10/18
from config import db


class CreateProducer(db.Model):
    __tablename__ = 'FoodTraceNew_produces_method'
    pk_id = db.Column(db.BIGINT , primary_key=True)
    block_height = db.Column(db.BIGINT)
    block_time_stamp = db.Column(db.DateTime)
    contract_address = db.Column(db.String)
    depot_updatetime = db.Column(db.DateTime)
    method_status = db.Column(db.String)
    tx_hash = db.Column(db.String)
    order_no = db.Column(db.BIGINT)
    prod_no = db.Column(db.BIGINT)
    order_type = db.Column(db.BIGINT)
    food_id = db.Column(db.BIGINT)
    price = db.Column(db.BIGINT)
    num = db.Column(db.BIGINT)
    output1 = db.Column(db.BIGINT)



    def to_json(self):
        json_dict = self.__dict__
        if "_sa_instance_state" in json_dict:
            del json_dict["_sa_instance_state"]
        return json_dict

